/**
 * 
 */
package com.youth.fund.hk.hostManager.manager.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.youth.fund.hk.hostManager.common.dao.ICommonDao;
import com.youth.fund.hk.hostManager.common.service.impl.CommonService;
import com.youth.fund.hk.hostManager.manager.dao.FlashDao;
import com.youth.fund.hk.hostManager.manager.datamodel.FlashModel;
import com.youth.fund.hk.hostManager.manager.service.FlashService;

/**
 * @author Sunk_Sky
 *
 * 2014年12月18日下午7:46:13
 */
@Service("FlashService")
public class FlashServieImpl extends CommonService<FlashModel> implements FlashService
{
	private FlashDao flashDao;
	
	@Autowired
	@Qualifier("FlashDao")
	@Override
	public void setCommonDao(ICommonDao<FlashModel> commonDao)
	{
		this.commonDao = commonDao;
		
		this.flashDao = (FlashDao) commonDao;
		
	}
	
	@Override
	public boolean freshFlash(FlashModel model)
	{
		this.flashDao.setAvailable();
		
		model.setAvailable(true);
		
		return this.create(model);
	}
	@Override
	public void generateHtml(FlashModel model)
	{
		// TODO Auto-generated method stub
		
	}

}
